<?php


class UpdateUser extends Connection {
	private $conn;

	public function __construct() {
		Connection::init();
		$this->conn = $this->getConnection();
	}

	public function updateStatus($flag,$id){

		$stmt = $this->conn->prepare("	UPDATE `user`
										SET status_id =?
										WHERE id = ?");

		if ($flag) {
			$stmt->bindValue(1,2,PDO::PARAM_INT);
		} else {
			$stmt->bindValue(1,3,PDO::PARAM_INT);
		}
		$stmt->bindValue(2,(int)$id,PDO::PARAM_INT);
		$stmt->execute();


	}

}
?>